//
//  MPRStyleViewCell.m
//  720PMPR
//
//  Created by lanou on 15/10/26.
//  Copyright © 2015年 青菜君. All rights reserved.
//

#import "MPRStyleViewCell.h"
#import <UIImageView+WebCache.h>
@implementation MPRStyleViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        _picImageView = [[UIImageView alloc] initWithFrame:CGRectMake(15, 5, 70, 70)];
        [self.contentView addSubview:_picImageView];
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(90, 5, SCREEN_WIDTH - 105, 30)];
        [self.contentView addSubview:_titleLabel];
        
        _dataLabel = [[UILabel alloc] initWithFrame:CGRectMake(90, 40, SCREEN_WIDTH - 105, 35)];
        _dataLabel.numberOfLines = 2;
        _dataLabel.font = [UIFont systemFontOfSize:12];
        _dataLabel.textColor = [UIColor grayColor];
        [self.contentView addSubview:_dataLabel];
        
        _imageview = [[UIImageView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH - 45, 25, 30, 30)];
        _imageview.image = [UIImage imageNamed:@"iconfont-wiappxiayiye-3"];
        [self.contentView addSubview:_imageview];
        
        
    }
    return self;
}

- (void)setStyleMosel:(MPRStyleModel *)styleMosel
{
    _styleMosel = styleMosel;
    [_picImageView sd_setImageWithURL:[NSURL URLWithString:styleMosel.icon_url]];
    _titleLabel.text = styleMosel.title;
    _dataLabel.text = styleMosel.subtitle;
    
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
